const express = require('express');

const app = express();

app.use((req, res, next) => {
  console.log(new Date());
  next(); // 不写next()就不会进入下面的路由
});

app.get('/', (req, res) => {
  res.send('微博爬虫');
});

app.get('/detail', (req, res) => {
  res.send('微博详情');
});

app.use((req, res, next) => {
  res.status(404).send('404');
});

app.listen(9999);
